<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    {$LOAD_STYLE.top|raw}
</head>
<body>
<style>
#dataTable tr th{
  background: #FAFAFA;
  text-align: center;
}
#list_table td{
	word-break:break-all;
	height: 30px;
	padding: 0px;
	background: #FFF;
}
#list_table .layui-input:focus,#list_table select:focus{
  border-bottom: solid 2px #5DC5B8;
  background: #E3F7F7;
}
#list_table .layui-input{
	padding-left:12px;
	padding-right:12px;
	border-radius: 0px;
	border: none;
	text-align: center;
	border-bottom:solid 2px #FFFFFF; ;
}
.refund{
	display: none;
}
.price-input{
	text-align: center;
}

.moblie-box .li{
	margin: 0px;
	float: left;
	border: 1px solid #CCCCCC;
	border-right: none;
	border-bottom: none;
	margin-bottom: 20px;
}
.moblie-box .li .row{
	padding: 0px;
	margin: 0px;
}
.moblie-box .li input[type=text],.moblie-box .li select{
	text-align: center;
	border-radius: 0px;
	border: none;
}
.moblie-box .li div[class^="layui-col-xs"]{
	border: 1px solid #CCCCCC;
	border-left: none;
	border-top: none;
}
.moblie-box .li .subtitle{
	background-color: #EEEEEE;
	text-align: center;
	height: 39px;
	line-height: 39px;
}
.moblie-box .li .unit{
	border: none;
}
.moblie-box .extend .layui-row{
	margin: 5px;
	margin-bottom: 15px;
}
.moblie-box .invoice-btn{
	border-top: 1px solid #CCC;
	background-color: #FFFFFF;
	height: 60px;
	width: 100%;
	text-align: center;
	position: fixed;
	bottom: 0px;
	left: 0px;
	padding-top: 8px;
	z-index: 20;
}
</style>
<form class="layui-form" action="">
    <div class="mainBox">
        <div class="main-container">
			
			<!--手机端-->
			{if isMobile()}
			<div class="moblie-box">
				<div class="layui-form-item layui-row">
						<div class="layui-col-xs10">
							
							{if $action_up}
							<input type="text" id="search_input" class="layui-input search-input" value="{$model.customer.name}" readonly="readonly"/>
							{else/}
							<input type="text" id="search_input" class="layui-input search-input" verify="must" verify_tips="hide" url="{:U('customer.main/findname')}" placeholder="输入客户名称检索"/>
							{/if}
							<input type="hidden" name="cusid" verify="must" verify_tips="hide" value="{$model.cusid??''}"/>
							<div class="search-list" id="customer">
								<dl></dl>
							</div>
						</div>
						<div class="layui-col-xs2">
							<button type="button" class="pear-btn pear-btn-primary" id="customer-btn">搜索</button>
						</div>
				</div>
				
				<div class="extend">
					<div class="layui-row">
						<div class="layui-col-xs12">
							<div class="input-group price-text">
								<span class="input-group-addon">下单时间</span>
								<input type="text" id="create_time" name="create_time" value="{$model.create_time??date('Y-m-d H:i:s')}" placeholder="请输入添加时间" class="layui-input"  verify="must">
							</div>
						</div>
					</div>
				</div>
				
				
				{for start="0" end="$maxlist" name="i"}
				<div class="li">
					<div class="layui-row">
						<div class="layui-col-xs1 subtitle">{$i+1}</div>
						<div class="layui-col-xs6">
							<input class="layui-input" type="text" data-id="{$i}" placeholder="编号" name="info[number][]" value="{$Tinfo[$i]['number']??''}">
							<input class="layui-input" type="hidden" data-id="cloid{$i}" name="info[cloid][]" value="{$Tinfo[$i]['cloid']??''}">
							<input class="layui-input" type="hidden" data-id="infoid{$i}" name="info[infoid][]" value="{$Tinfo[$i]['id']??''}">
						</div>
						<div class="layui-col-xs2 subtitle">色号</div>
						<div class="layui-col-xs3"><input class="layui-input popovers" type="text" name="info[color][]" value="{$Tinfo[$i]['color']??''}" placeholder="色号" data-original-title="" data-content="" data-placement="top" data-trigger="hover">
						<input type="hidden" name="info[colorname][]" value="{$Tinfo[$i]['colorname']??''}">
						<input type="hidden" name="info[colorval][]" value="{$Tinfo[$i]['colorval']??''}">
						<input type="hidden" name="info[gray][]" value="{$Tinfo[$i]['gray']??''}">
						<input type="hidden" name="info[onumber][]" value="{$Tinfo[$i]['onumber']??''}">
						<input type="hidden" name="info[ocolorid][]" value="{$Tinfo[$i]['ocolorid']??''}">
					</div>
					{php}
					  if(!isset($Tinfo[$i]['weight'])){
						  $Tinfo[$i]['unit']='';
					  }
					{/php}
					</div>
					<div class="layui-row">
						<div class="layui-col-xs7"><input class="layui-input" type="text" data-id="name{$i}" name="info[name][]" value="{$Tinfo[$i]['name']??''}" placeholder="品名"></div>
						<div class="layui-col-xs2 subtitle">单位</div>
						<div class="layui-col-xs3">
							<select class="layui-input" data-id="unit{$i}" name="info[unit][]" lay-ignore>
							  <option value="米" {eq name="Tinfo[$i]['unit']" value='米'}selected{/eq}>米</option>
							  <option value="KG" {eq name="Tinfo[$i]['unit']" value='KG'}selected{/eq}>KG</option>
							  <option value="码" {eq name="Tinfo[$i]['unit']" value='码'}selected{/eq}>码</option>
							  <option value="KG" {eq name="Tinfo[$i]['unit']" value='白KG'}selected{/eq}>白KG</option>
							</select>
						</div>
					</div>
					<div class="layui-row">
						<div class="layui-col-xs3"><input class="layui-input" type="text" name="info[weight][{$i}][]" value="{$Tinfo[$i]['weight'][0]??''}"></div>
						<div class="layui-col-xs3"><input class="layui-input" type="text" name="info[weight][{$i}][]" value="{$Tinfo[$i]['weight'][1]??''}"></div>
						<div class="layui-col-xs3"><input class="layui-input" type="text" name="info[weight][{$i}][]" value="{$Tinfo[$i]['weight'][2]??''}"></div>
						<div class="layui-col-xs3"><input class="layui-input" type="text" name="info[weight][{$i}][]" value="{$Tinfo[$i]['weight'][3]??''}"></div>
					</div>
					<div class="layui-row">
						<div class="layui-col-xs3"><input class="layui-input" type="text" name="info[weight][{$i}][]" value="{$Tinfo[$i]['weight'][4]??''}"></div>
						<div class="layui-col-xs3"><input class="layui-input" type="text" name="info[weight][{$i}][]" value="{$Tinfo[$i]['weight'][5]??''}"></div>
						<div class="layui-col-xs3"><input class="layui-input" type="text" name="info[weight][{$i}][]" value="{$Tinfo[$i]['weight'][6]??''}"></div>
						<div class="layui-col-xs3"><input class="layui-input" type="text" name="info[weight][{$i}][]" value="{$Tinfo[$i]['weight'][7]??''}"></div>
					</div>
					<div class="layui-row">
						<div class="layui-col-xs2 subtitle">数量</div>
						<div class="layui-col-xs4"><input class="layui-input" type="text" data-id="count{$i}" name="info[count][]" value="{$Tinfo[$i]['count']??''}"><input type="hidden" data-id="roll{$i}" name="info[roll][]" value="{$Tinfo[$i]['roll']??''}"></div>
						<div class="layui-col-xs2 subtitle">单价</div>
						<div class="layui-col-xs4"><input class="layui-input" type="text" data-id="unitprice{$i}" name="info[unitprice][]" value="{$Tinfo[$i]['unitprice']??''}"></div>
					</div>
					<div class="layui-row">
						<div class="layui-col-xs2 subtitle">- KG</div>
						<div class="layui-col-xs4"><input class="layui-input" type="text" data-id="reduce{$i}" name="info[reduce][]" value="{$Tinfo[$i]['reduce']??''}"></div>
						<div class="layui-col-xs2 subtitle">合计</div>
						<div class="layui-col-xs4"><input class="layui-input" type="text" data-id="total{$i}" name="info[total][]" value="{$Tinfo[$i]['total']??''}"></div>
					</div>
					<div class="layui-row" style="display: none;">
						<div class="layui-col-xs2 subtitle">缸号</div>
						<div class="layui-col-xs10 subtitle">
							<input class="layui-input" type="text" data-id="bacth{$i}" name="info[bacth][]" value="{$Tinfo[$i]['bacth']??''}" placeholder="缸号">
						</div>
					</div>
				</div>
				{/for}
				
				<div class="extend">
					<div class="layui-row">
						<div class="layui-col-xs12">
							{php}if(!$action_up) $model["status"]=0;{/php}
							{volist name="options.deal_status" id="v"}
							{if $v.id == $model.status}
							<input type="radio" name="status" title="{$v.val}" value="{$v.id}" checked lay-filter="status">
							{else/}
							<input type="radio" name="status" title="{$v.val}" value="{$v.id}" lay-filter="status">
							{/if}
							{/volist}
						</div>
					</div>
					
					<div class="layui-row">
						<div class="layui-col-xs12">
							<div class="input-group Companies">
							<span class="input-group-addon">支付方式</span>
							{if $model.is_olpay??0==1}
								<input type="text" class="layui-input" autocomplete="off" name="paytype" disabled="disabled" value="{$model.paytype??''}">
								<input type="hidden" name="paytype" value="{$model.paytype??''}"/>
							{else/}  
							  <select name="paytype"  lay-verify="required">
								<option value=""></option>
								{volist name="options.pay_type" id="v"}
								{if !$action_up}
								<option value="{$v}" {if $v=="微信支付"}selected="selected"{/if}>{$v}</option>
								{elseif $v == $model.paytype}
								<option value="{$v}" selected="selected">{$v}</option>
								{else/}
								<option value="{$v}">{$v}</option>
								{/if}
								{/volist}
							  </select>
							{/if}
							</div>
						</div>
					</div>
					
					<div class="layui-row">
						<div class="layui-col-xs6">
							<div class="input-group Companies">
								<span class="input-group-addon">物流</span>
								<select name="courier" >
								<option value=""></option>
								{volist name="courier" id="v"}
								{if !$action_up}
								<option value="{$v.name}">{$v.name}</option>
								{elseif $v.name == $model.courier}
								<option value="{$v.name}" selected="selected">{$v.name}</option>
								{else/}
								<option value="{$v.name}">{$v.name}</option>
								{/if}
								{/volist}
								</select>
							</div>
						</div>
						<div class="layui-col-xs1">&nbsp;</div>
						<div class="layui-col-xs5">
							<div class="input-group price-text">
								<span class="input-group-addon">运费</span>
								<input type="text" class="layui-input price-input" autocomplete="off" name="freight" value="{$model.freight??0}" verify="float" verify_tips="hide">
								<span class="input-group-addon">元</span>
							</div>
						</div>
					</div>
					
					<div class="layui-row">
						<div class="layui-col-xs5">
							<div class="input-group price-text">
								<span class="input-group-addon">数量</span>
								<input type="text" class="layui-input price-input" autocomplete="off" name="count" value="{$model.count??0}" verify="float|gt0" verify_tips="hide">
							</div>
						</div>
						<div class="layui-col-xs1">&nbsp;</div>
						<div class="layui-col-xs6">
							<div class="input-group price-text">
								<span class="input-group-addon">优惠</span>
								<input type="text" class="layui-input price-input" autocomplete="off" name="reduce" value="{$model.reduce??0}">
								<span class="input-group-addon">KG</span>
							</div>
						</div>
					</div>
					
					<div class="layui-row">
						<div class="layui-col-xs5">
							<div class="input-group price-text">
								<span class="input-group-addon">差价</span>
								<input type="text" class="layui-input price-input" autocomplete="off" name="coupon" value="{$model.coupon??0}">
								<span class="input-group-addon">元</span>
							</div>
						</div>
						<div class="layui-col-xs1">&nbsp;</div>
						<div class="layui-col-xs6">
							<div class="input-group price-text">
								<span class="input-group-addon">进货价</span>
								<input type="text" class="layui-input price-input" autocomplete="off" name="cost" value="{$model.cost??0}" verify="float" verify_tips="hide">
								<span class="input-group-addon">元</span>
							</div>
						</div>
					</div>
					
					<div class="layui-row">
						<div class="layui-col-xs12">
							<div class="input-group price-text">
								<span class="input-group-addon">总计</span>
								<input type="text" class="layui-input price-input" autocomplete="off" name="total" value="{$model.total??0}" verify="float" verify_tips="hide">
								<span class="input-group-addon">元</span>
							</div>
						</div>
					</div>
				</div>
			</div>
			
			{else/}
			
			<!--电脑端-->
			<div class="layui-row">
				<div class="layui-col-md6">
					<div class="layui-form-item">
						<div class="layui-col-md8">
							<div class="layui-input-inline2 input-group" style="width: 100%;">
								<span class="input-group-addon">客户</span>
								{if $action_up}
								<input type="text" id="search_input" class="layui-input search-input" value="{$model.customer.name}" readonly="readonly"/>
								{else/}
								<input type="text" id="search_input" class="layui-input search-input" verify="must" verify_tips="hide" url="{:U('customer.main/findname')}"/>
								{/if}
								<input type="hidden" name="cusid" verify="must" verify_tips="hide" value="{$model.cusid??''}"/>
								<div class="search-list" id="customer">
									<dl></dl>
								</div>
							</div>
						</div>
						<div class="layui-col-md4">
							<span>&nbsp;</span>
							<button type="button" class="pear-btn pear-btn-primary" id="customer-btn">搜索</button>
						</div>
					</div>
				</div>
				<div class="layui-col-md3 layui-col-md-offset3" style="text-align: right;">
					<div class="layui-form-item layui-inline">
					   <div class="layui-input-inline2 input-group">
						   <span class="input-group-addon">下单时间</span>
						   <input type="text" id="create_time" name="create_time" value="{$model.create_time??date('Y-m-d H:i:s')}" placeholder="请输入添加时间" class="layui-input"  verify="must">
					   </div>
					</div>
				</div>
			</div>
			<div class="layui-row">	
				<div class="layui-col-md12">
					<table class="layui-table" id="dataTable">
						<thead>
						<tr>
							<td colspan="18" style="background-color:#F8F8F8;">加价提醒：<span id="markup_txt" style="color:#C00;"></span></td>
						</tr>
						<tr>
							<th width="1%">序</th>
							<th width="7%">编号</th>
							<th width="10%">品名</th>
							<th width="5%">颜色</th>
							<th width="5%">1</th>
							<th width="5%">2</th>
							<th width="5%">3</th>
							<th width="5%">4</th>
							<th width="5%">5</th>
							<th width="5%">6</th>
							<th width="5%">7</th>
							<th width="5%">8</th>
							<th width="5%">单位</th>
							<th width="8%">数量</th>
							<th width="5%">- KG</th>
							<th width="5%">单价</th>
							<th width="8%">金额</th>
							<th width="8%">批次</th>
						</tr>
						</thead>
						<tbody>
							{for start="0" end="$maxlist" name="i"}
							<tr id='list_table'>
								<td style="text-align:center;line-height:34px;background:#FAFAFA;">{$i+1}</td>
								<td>
								  <input class="layui-input" type="text" data-id="{$i}" name="info[number][]" value="{$Tinfo[$i]['number']??''}">
								  <input class="layui-input" type="hidden" data-id="cloid{$i}" name="info[cloid][]" value="{$Tinfo[$i]['cloid']??''}">
								  <input class="layui-input" type="hidden" data-id="infoid{$i}" name="info[infoid][]" value="{$Tinfo[$i]['id']??''}">
								</td>
								<td><input class="layui-input" type="text" data-id="name{$i}" name="info[name][]" value="{$Tinfo[$i]['name']??''}"></td>
								<td><input class="layui-input popovers" type="text" name="info[color][]" value="{$Tinfo[$i]['color']??''}" data-original-title="" data-content="" data-placement="top" data-trigger="hover">
								<input type="hidden" name="info[colorname][]" value="{$Tinfo[$i]['colorname']??''}">
								<input type="hidden" name="info[colorval][]" value="{$Tinfo[$i]['colorval']??''}">
								<input type="hidden" name="info[gray][]" value="{$Tinfo[$i]['gray']??''}">
								<input type="hidden" name="info[onumber][]" value="{$Tinfo[$i]['onumber']??''}">
								<input type="hidden" name="info[ocolorid][]" value="{$Tinfo[$i]['ocolorid']??''}">
								</td>
								{php}
								  if(!isset($Tinfo[$i]['weight'])){
									  $Tinfo[$i]['unit']='';
								  }
								{/php}
								<td><input class="layui-input" type="text" name="info[weight][{$i}][]" value="{$Tinfo[$i]['weight'][0]??''}"></td>
								<td><input class="layui-input" type="text" name="info[weight][{$i}][]" value="{$Tinfo[$i]['weight'][1]??''}"></td>
								<td><input class="layui-input" type="text" name="info[weight][{$i}][]" value="{$Tinfo[$i]['weight'][2]??''}"></td>
								<td><input class="layui-input" type="text" name="info[weight][{$i}][]" value="{$Tinfo[$i]['weight'][3]??''}"></td>
								<td><input class="layui-input" type="text" name="info[weight][{$i}][]" value="{$Tinfo[$i]['weight'][4]??''}"></td>
								<td><input class="layui-input" type="text" name="info[weight][{$i}][]" value="{$Tinfo[$i]['weight'][5]??''}"></td>
								<td><input class="layui-input" type="text" name="info[weight][{$i}][]" value="{$Tinfo[$i]['weight'][6]??''}"></td>
								<td><input class="layui-input" type="text" name="info[weight][{$i}][]" value="{$Tinfo[$i]['weight'][7]??''}"></td>
								<td>
								<select class="layui-input" data-id="unit{$i}" name="info[unit][]" lay-ignore>
								  <option value="米" {eq name="Tinfo[$i]['unit']" value='米'}selected{/eq}>米</option>
								  <option value="KG" {eq name="Tinfo[$i]['unit']" value='KG'}selected{/eq}>KG</option>
								  <option value="码" {eq name="Tinfo[$i]['unit']" value='码'}selected{/eq}>码</option>
								  <option value="KG" {eq name="Tinfo[$i]['unit']" value='白KG'}selected{/eq}>白KG</option>
								</select>
								</td>
								<td><input class="layui-input" type="text" data-id="count{$i}" name="info[count][]" value="{$Tinfo[$i]['count']??''}"><input type="hidden" data-id="roll{$i}" name="info[roll][]" value="{$Tinfo[$i]['roll']??''}"></td>
								<td><input class="layui-input" type="text" data-id="reduce{$i}" name="info[reduce][]" value="{$Tinfo[$i]['reduce']??''}"></td>
								<td><input class="layui-input" type="text" data-id="unitprice{$i}" name="info[unitprice][]" value="{$Tinfo[$i]['unitprice']??''}"></td>
								<td><input class="layui-input" type="text" data-id="total{$i}" name="info[total][]" value="{$Tinfo[$i]['total']??''}"></td>
								<td><input class="layui-input" type="text" data-id="bacth{$i}" name="info[bacth][]" value="{$Tinfo[$i]['bacth']??''}"></td>
							</tr>
							{/for}
							<tr>
								<td colspan="3" style="text-align: center;">
									{php}if(!$action_up) $model["status"]=0;{/php}
									{volist name="options.deal_status" id="v"}
									{if $v.id == $model.status}
									<input type="radio" name="status" title="{$v.val}" value="{$v.id}" checked lay-filter="status">
									{else/}
									<input type="radio" name="status" title="{$v.val}" value="{$v.id}" lay-filter="status">
									{/if}
									{/volist}
								</td>
								<td colspan="3" class="price-text">
									<div class="input-group Companies">
									<span class="input-group-addon">支付方式</span>
									{if $model.is_olpay??0==1}
										<input type="text" class="layui-input" autocomplete="off" name="paytype" disabled="disabled" value="{$model.paytype??''}">
										<input type="hidden" name="paytype" value="{$model.paytype??''}"/>
									{else/}  
									  <select name="paytype"  lay-verify="required">
										<option value=""></option>
										{volist name="options.pay_type" id="v"}
										{if !$action_up}
										<option value="{$v}" {if $v=="微信支付"}selected="selected"{/if}>{$v}</option>
										{elseif $v == $model.paytype}
										<option value="{$v}" selected="selected">{$v}</option>
										{else/}
										<option value="{$v}">{$v}</option>
										{/if}
										{/volist}
									  </select>
									{/if}
									</div>
								</td>
								<td colspan="3">
									<div class="input-group price-text">
										<span class="input-group-addon">总数量</span>
										<input type="text" class="layui-input price-input" autocomplete="off" name="count" value="{$model.count??0}" verify="float|gt0" verify_tips="hide">
									</div>
								</div>
								<td colspan="3">
									<div class="input-group price-text">
										<span class="input-group-addon">优惠</span>
										<input type="text" class="layui-input price-input" autocomplete="off" name="reduce" value="{$model.reduce??0}">
										<span class="input-group-addon">公斤</span>
									</div>
								</div>
								<td colspan="3">
									<div class="input-group price-text">
										<span class="input-group-addon">差价</span>
										<input type="text" class="layui-input price-input" autocomplete="off" name="coupon" value="{$model.coupon??0}">
										<span class="input-group-addon">元</span>
									</div>
								</div>
								<td colspan="3">
									<div class="input-group price-text">
										<span class="input-group-addon">进货成本</span>
										<input type="text" class="layui-input price-input" autocomplete="off" name="cost" value="{$model.cost??0}" verify="float" verify_tips="hide">
										<span class="input-group-addon">元</span>
									</div>
								</td>
								
							</tr>
							<tr>
								<td colspan="3">
								  <div class="input-group Companies">
									  <span class="input-group-addon">快递/物流</span>
									  <select name="courier" >
										<option value=""></option>
										{volist name="courier" id="v"}
										{if !$action_up}
										<option value="{$v.name}">{$v.name}</option>
										{elseif $v.name == $model.courier}
										<option value="{$v.name}" selected="selected">{$v.name}</option>
										{else/}
										<option value="{$v.name}">{$v.name}</option>
										{/if}
										{/volist}
									  </select>
								  </div>
								</td>
								<td colspan="3">
								  <input type="text" class="layui-input" autocomplete="off" name="kdnumber" value="{$model.kdnumber??''}" placeholder="快递单号">
								</td>
								<td colspan="3">
									<div class="input-group price-text">
										<span class="input-group-addon">运费</span>
										<input type="text" class="layui-input price-input" autocomplete="off" name="freight" value="{$model.freight??0}" verify="float" verify_tips="hide">
										<span class="input-group-addon">元</span>
									</div>
								</td>
								<td colspan="1" class="td_center" style="padding-top: 15px;text-align: center;">备注</td>
								<td colspan="5"><input type="text" class="layui-input" autocomplete="off" name="remark" value="{$model.remark??''}" placeholder="备注信息仅商家后台可以查看"></td>
								<td colspan="3">
									<div class="input-group price-text">
										<span class="input-group-addon">总计</span>
										<input type="text" class="layui-input price-input" autocomplete="off" name="total" value="{$model.total??0}" verify="float" verify_tips="hide">
										<span class="input-group-addon">元</span>
									</div>
								</td>
							</tr>
							<tr class="refund">
							  <td colspan="2" class="td_center">退货时间：</td>
							  <td colspan="2"><input type="text" class="layui-input" autocomplete="off" name="refundtime" value="{$model.refundtime??''}" placeholder="订单状态为退货才需填写"></td>
							  <td colspan="2" class="td_center">退货原因：</td>
							  <td colspan="11"><input type="text" class="layui-input" autocomplete="off" name="refundtxt" value="{$model.refundtxt??''}" placeholder="订单状态为退货才需填写"></td>
							</tr>
						</tbody>
					</table>
				</div>
			</div>
			{/if}

        </div>
    </div>
    <div class="bottom">
        <div class="button-container">
            <button type="button" class="pear-btn pear-btn-primary pear-btn-sm" lay-submit="" lay-filter="save" verify="submit">
                <i class="layui-icon layui-icon-ok"></i>
                提交
            </button>
            <button type="reset" class="layui-btn layui-btn-primary layui-btn-sm">
                <i class="layui-icon layui-icon-refresh"></i>
                重置
            </button>
        </div>
    </div>
</form>

<div id="getcolor_url" style="display: none;">{:U('deal.main/color')}</div>
<div id="clothList_url" style="display: none;">{:U('deal.main/cloth')}</div>
<div id="ismobile" style="display: none;">{:ismobile()}</div>
<script>
	layui.use(['form', 'jquery', 'uploads','common','mycomm','laydate'], function () {
		let form = layui.form;
		let $ = layui.jquery;
		let laydate = layui.laydate;
		let common = layui.common;
		let mycomm = layui.mycomm;
		
		laydate.render({
			elem: '#create_time' ,//指定元素
			value:'{$model.create_time??''}',
			type:'datetime'
		});
	
		mycomm.editSubmit('',function(){
			if(window.name==''){
				location.href="{:U('deal.main/index')}";
			}
		});
		
		function resize_group_width(){
		//改变窗口同步宽度
			$(window).resize(function() {
			  resize_group_width();
			});  $('#groupid').width($('#js-groupId').width()+24);
		}
		
		resize_group_width();
		
		//获取产品数据
		function get_cloth_list(){
			var url=$("#clothList_url").html();
			var data={};
			$.post(url,data,function(res){
				clothlist=res;
			},'json');
		}
		
		$(document).ready(function(){
		  //$('#js-groupId').focus();
		  get_cloth_list();
		});
	})
</script>
<script src="__TPL_JS__/deal-add.js?v=1.0.0"></script>
{if !$action_up}
<script src="__TPL_JS__/cus-search.js"></script>
{/if}
{$LOAD_STYLE.bottom|raw}
</body>
</html>